package com.base.core.framework;

import org.apache.commons.lang.StringUtils;

public class Page {
	/** 升序 */
	public static final String ASC = "asc";
	/** 降序 */
	public static final String DESC = "desc";
	
	public int currentPage;
	public long recordTotal;
	public int recordPerPage = 20;
	/** 是否自动统计记录条数 */
	public boolean autoCount = true;
	/** 排序field */
	public String orderBy;
	/** 排序方式: ASC/DESC */
	public String order = ASC;

	/**
	 * 是否已设置排序字段,无默认值.
	 * 
	 * @return 是否已设置排序字段
	 */
	public boolean isOrderBySetted() {
		return (StringUtils.isNotBlank(orderBy) && StringUtils
				.isNotBlank(order));
	}
}
